﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class UserControls_ProductOverviewControl : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
  
        String idCate = Request.QueryString["ID"];
        String idSub = Request.QueryString["SubID"];
            
        if (idSub == null) 
        {
            if (idCate == null) idCate = "B1";
            productsList.DataSource = DataAccess.getCateProducts(idCate);
            productsList.DataBind();
        }
        else
        {
            productsList.DataSource = DataAccess.getSubProducts(idSub);
            productsList.DataBind();
        }
        
    }
}